/* Copyright 2018 JDCLOUD.COM

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http:#www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

媒体处理相关接口
多媒体处理服务API，包括截图、转码、媒体处理消息通知等操作。本文档详细说明了媒体处理API及用法，适合开发人员阅读。

OpenAPI spec version: v1
Contact: 

NOTE: This class is auto generated by the jdcloud code generator program.
*/

 

#ifndef MpsModel_h
#define MpsModel_h

@interface StyleDelimiterConf :NSObject

/// 图片样式分隔符配置（JSON数组）；支持的分隔符包含：[&quot;-&quot;, &quot;_&quot;, &quot;/&quot;, &quot;!&quot;]
@property (strong,nonatomic,nonnull)  NSArray<NSString*>*  delimiters;


-(id) initWithDelimiters:(NSArray<NSString*>*) delimiters;
-(NSMutableDictionary*) dictionary;

-(id) initWithDic:(NSDictionary*)dictionary;                    
@end
@interface ImageStyleCount :NSObject

/// 图片样式总数
@property (strong,nonatomic,nonnull)  NSNumber*  styleCount;


-(id) initWithStyleCount:(NSNumber*) styleCount;
-(NSMutableDictionary*) dictionary;

-(id) initWithDic:(NSDictionary*)dictionary;                    
@end
@interface ImageStyleID :NSObject

/// 图片样式ID
@property (strong,nonatomic,nonnull)  NSNumber*  idValue;


-(id) initWithId:(NSNumber*) idValue;
-(NSMutableDictionary*) dictionary;

-(id) initWithDic:(NSDictionary*)dictionary;                    
@end
@interface ImageStyle :NSObject

/// 图片样式id(readOnly)
@property (strong,nonatomic,nonnull)  NSNumber*  idValue;

/// 用户id(readOnly)
@property (strong,nonatomic,nonnull)  NSString*  userId;

/// 图片样式名称
@property (strong,nonatomic,nonnull)  NSString*  styleName;

/// 图片样式参数
@property (strong,nonatomic,nonnull)  NSString*  params;

/// 图片样式参数别名
@property (strong,nonatomic,nonnull)  NSString*  paramAlias;

/// 所属区域(readOnly)
@property (strong,nonatomic,nonnull)  NSString*  regionId;

/// 所属Bucket(readOnly)
@property (strong,nonatomic,nonnull)  NSString*  bucketName;

/// 图片样式状态(readOnly)
@property (strong,nonatomic,nonnull)  NSNumber*  status;

/// 修改时间(readOnly)
@property (strong,nonatomic,nonnull)  NSString*  modifyTime;

/// 创建时间(readOnly)
@property (strong,nonatomic,nonnull)  NSString*  createdTime;


-(id) initWithId:(NSNumber*) idValue
    userId:(NSString*)userId
    styleName:(NSString*)styleName
    params:(NSString*)params
    paramAlias:(NSString*)paramAlias
    regionId:(NSString*)regionId
    bucketName:(NSString*)bucketName
    status:(NSNumber*)status
    modifyTime:(NSString*)modifyTime
    createdTime:(NSString*)createdTime;
-(NSMutableDictionary*) dictionary;

-(id) initWithDic:(NSDictionary*)dictionary;                    
@end
@interface ThumbnailTaskRule :NSObject

/// 截图模式 单张: single 多张: multi 平均: average default: single
@property (strong,nonatomic,nonnull)  NSString*  mode;

/// 是否开启关键帧截图 default: true
@property (strong,nonatomic,nonnull)  NSNumber*  keyFrame;

/// 生成截图的开始时间, mode&#x3D;average 时不可选. default:0
@property (strong,nonatomic,nonnull)  NSNumber*  startTimeInSecond;

/// 生成截图的结束时间, mode&#x3D;single/average时不可选, 且不得小于startTimeInSecond. default:-1(代表视频时长)
@property (strong,nonatomic,nonnull)  NSNumber*  endTimeInSecond;

/// 截图数量, mode&#x3D;single时不可选. default:1
@property (strong,nonatomic,nonnull)  NSNumber*  count;


-(id) initWithMode:(NSString*) mode
    keyFrame:(NSNumber*)keyFrame
    startTimeInSecond:(NSNumber*)startTimeInSecond
    endTimeInSecond:(NSNumber*)endTimeInSecond
    count:(NSNumber*)count;
-(NSMutableDictionary*) dictionary;

-(id) initWithDic:(NSDictionary*)dictionary;                    
@end
@interface ThumbnailTaskSource :NSObject

/// 输入视频信息的 bucket
@property (strong,nonatomic,nonnull)  NSString*  bucket;

/// 输入视频信息的 Key
@property (strong,nonatomic,nonnull)  NSString*  key;


-(id) initWithBucket:(NSString*) bucket
    key:(NSString*)key;
-(NSMutableDictionary*) dictionary;

-(id) initWithDic:(NSDictionary*)dictionary;                    
@end
@interface ThumbnailStatus :NSObject

/// 状态 (SUCESS, ERROR, PENDDING, RUNNING)
@property (strong,nonatomic,nonnull)  NSString*  status;

/// 错误码
@property (strong,nonatomic,nonnull)  NSNumber*  errorCode;

/// 成功时生成的截图文件个数
@property (strong,nonatomic,nonnull)  NSNumber*  count;


-(id) initWithStatus:(NSString*) status
    errorCode:(NSNumber*)errorCode
    count:(NSNumber*)count;
-(NSMutableDictionary*) dictionary;

-(id) initWithDic:(NSDictionary*)dictionary;                    
@end
@interface Notification :NSObject

/// 是否启用通知
@property (strong,nonatomic,nonnull)  NSNumber*  enabled;

/// 通知endpoint, 当前支持http://和https://
@property (strong,nonatomic,nonnull)  NSString*  endpoint;

/// 触发通知的事件集合 (mpsTranscodeComplete, mpsThumbnailComplete)
@property (strong,nonatomic,nonnull)  NSArray<NSString*>*  events;

/// 重试策略, BACKOFF_RETRY: 退避重试策略, 重试 3 次, 每次重试的间隔时间是 10秒 到 20秒 之间的随机值; EXPONENTIAL_DECAY_RETRY: 指数衰减重试, 重试 176 次, 每次重试的间隔时间指数递增至 512秒, 总计重试时间为1天; 每次重试的具体间隔为: 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 512 ... 512 秒(共167个512)
@property (strong,nonatomic,nonnull)  NSString*  notifyStrategy;

/// 描述了向 Endpoint 推送的消息格式, JSON: 包含消息正文和消息属性, SIMPLIFIED: 消息体即用户发布的消息, 不包含任何属性信息
@property (strong,nonatomic,nonnull)  NSString*  notifyContentFormat;


-(id) initWithEnabled:(NSNumber*) enabled
    endpoint:(NSString*)endpoint
    events:(NSArray<NSString*>*)events
    notifyStrategy:(NSString*)notifyStrategy
    notifyContentFormat:(NSString*)notifyContentFormat;
-(NSMutableDictionary*) dictionary;

-(id) initWithDic:(NSDictionary*)dictionary;                    
@end
@interface ThumbnailTaskTarget :NSObject

/// 输入存放目标文件的 bucket
@property (strong,nonatomic,nonnull)  NSString*  destBucket;

/// 目标截图的Key的前缀, &#39;前缀-taskID-%04d(num).(format)&#39;, 默认: sourceKey
@property (strong,nonatomic,nonnull)  NSString*  destKeyPrefix;

/// 目标截图的格式 default: jpg
@property (strong,nonatomic,nonnull)  NSString*  format;

/// 目标截图的宽, 如果视频实际分辨率低于目标分辨率则按照实际分辨率输出 default: 0 代表源视频高 其他[8, 4096]
@property (strong,nonatomic,nonnull)  NSNumber*  widthInPixel;

/// 目标截图的高, 如果视频实际分辨率低于目标分辨率则按照实际分辨率输出 default: 0 代表源视频高 其他[8, 4096]
@property (strong,nonatomic,nonnull)  NSNumber*  heightInPixel;

/// 目标截图的Key的集合 (readonly)
@property (strong,nonatomic,nonnull)  NSArray<NSString*>*  keys;


-(id) initWithDestBucket:(NSString*) destBucket
    destKeyPrefix:(NSString*)destKeyPrefix
    format:(NSString*)format
    widthInPixel:(NSNumber*)widthInPixel
    heightInPixel:(NSNumber*)heightInPixel
    keys:(NSArray<NSString*>*)keys;
-(NSMutableDictionary*) dictionary;

-(id) initWithDic:(NSDictionary*)dictionary;                    
@end
@interface TranscodeStatus :NSObject

/// 状态 (SUCESS, ERROR, PENDDING, RUNNING)
@property (strong,nonatomic,nonnull)  NSString*  status;

/// 错误码
@property (strong,nonatomic,nonnull)  NSNumber*  errorCode;

/// 通知消息, 由work调用, 暂时方案
@property (strong,nonatomic,nonnull)  NSString*  notifyMessage;


-(id) initWithStatus:(NSString*) status
    errorCode:(NSNumber*)errorCode
    notifyMessage:(NSString*)notifyMessage;
-(NSMutableDictionary*) dictionary;

-(id) initWithDic:(NSDictionary*)dictionary;                    
@end
@interface ThumbnailTaskID :NSObject

/// TaskID
@property (strong,nonatomic,nonnull)  NSString*  taskID;


-(id) initWithTaskID:(NSString*) taskID;
-(NSMutableDictionary*) dictionary;

-(id) initWithDic:(NSDictionary*)dictionary;                    
@end
@interface ImageStyleQueryResult :NSObject

/// 按样式名称查询
@property (strong,nonatomic,nonnull)  NSString*  styleName;

/// 数据页码
@property (strong,nonatomic,nonnull)  NSNumber*  pageNumber;

/// 每页数据的条数
@property (strong,nonatomic,nonnull)  NSNumber*  pageSize;

/// 图片样式列表
@property (strong,nonatomic,nonnull)  NSArray<ImageStyle*>*  imageStyleList;


-(id) initWithStyleName:(NSString*) styleName
    pageNumber:(NSNumber*)pageNumber
    pageSize:(NSNumber*)pageSize
    imageStyleList:(NSArray<ImageStyle*>*)imageStyleList;
-(NSMutableDictionary*) dictionary;

-(id) initWithDic:(NSDictionary*)dictionary;                    
@end
@interface ThumbnailTask :NSObject

/// 任务ID (readonly)
@property (strong,nonatomic,nonnull)  NSString*  taskID;

/// 状态 (SUCCESS, ERROR, PENDDING, RUNNING) (readonly)
@property (strong,nonatomic,nonnull)  NSString*  status;

/// 错误码 (readonly)
@property (strong,nonatomic,nonnull)  NSNumber*  errorCode;

/// 任务创建时间 时间格式(GMT): yyyy-MM-dd’T’HH:mm:ss.SSS’Z’  (readonly)
@property (strong,nonatomic,nonnull)  NSString*  createdTime;

/// 任务创建时间 时间格式(GMT): yyyy-MM-dd’T’HH:mm:ss.SSS’Z’  (readonly)
@property (strong,nonatomic,nonnull)  NSString*  lastUpdatedTime;

/// Source
@property (strong,nonatomic,nonnull)  ThumbnailTaskSource*  source;

/// Target
@property (strong,nonatomic,nonnull)  ThumbnailTaskTarget*  target;

/// Rule
@property (strong,nonatomic,nonnull)  ThumbnailTaskRule*  rule;


-(id) initWithTaskID:(NSString*) taskID
    status:(NSString*)status
    errorCode:(NSNumber*)errorCode
    createdTime:(NSString*)createdTime
    lastUpdatedTime:(NSString*)lastUpdatedTime
    source:(ThumbnailTaskSource*)source
    target:(ThumbnailTaskTarget*)target
    rule:(ThumbnailTaskRule*)rule;
-(NSMutableDictionary*) dictionary;

-(id) initWithDic:(NSDictionary*)dictionary;                    
@end
@interface ThumbnailQuery :NSObject

/// 状态 (SUCCESS, ERROR, PENDDING, RUNNING)
@property (strong,nonatomic,nonnull)  NSString*  status;

/// 查询开始时间 时间格式(GMT): yyyy-MM-dd’T’HH:mm:ss.SSS’Z’
@property (strong,nonatomic,nonnull)  NSString*  begin;

/// 查询结束时间 时间格式(GMT): yyyy-MM-dd’T’HH:mm:ss.SSS’Z’
@property (strong,nonatomic,nonnull)  NSString*  end;

/// 本次请求的marker, 标记查询的起始位置, 此处为taskID
@property (strong,nonatomic,nonnull)  NSString*  marker;

/// 本次请求返回的任务列表的最大元素个数, 有效值: [1-1000]，默认值: 1000
@property (strong,nonatomic,nonnull)  NSNumber*  limit;

/// 获取下一页所需要传递的marker值(此处为taskID), 仅当isTruncated为true时(数据未全部返回)出现 (readonly)
@property (strong,nonatomic,nonnull)  NSString*  nextMarker;

/// 指明返回数据是否被截断. true表示本页后面还有数据, 即数据未全部返回; false表示已是最后一页, 即数据已全部返回 (readonly)
@property (strong,nonatomic,nonnull)  NSNumber*  truncated;

/// 返回的task列表 (readonly)
@property (strong,nonatomic,nonnull)  NSArray<ThumbnailTask*>*  taskList;


-(id) initWithStatus:(NSString*) status
    begin:(NSString*)begin
    end:(NSString*)end
    marker:(NSString*)marker
    limit:(NSNumber*)limit
    nextMarker:(NSString*)nextMarker
    truncated:(NSNumber*)truncated
    taskList:(NSArray<ThumbnailTask*>*)taskList;
-(NSMutableDictionary*) dictionary;

-(id) initWithDic:(NSDictionary*)dictionary;                    
@end

#endif /* MpsModel_h */
